<template>
	<view>
		<view v-for="(item,index) in commentLists">
			<view style="display: flex;height: 25px;align-items: center;margin-bottom: 10rpx;">
				<view
					style="width: 36rpx;height: 36rpx;background: #999999;border-radius: 50%;background-size: 100% 100%;"
					:style="{ backgroundImage: ' url(' + item.avatar + ')' }"></view>
				<view style="font-size: 14px;font-weight: 500;margin-left: 8rpx;">{{item.nickname}}</view>
			</view>
			<view style="font-size: 14px;font-weight: 400;color: #333333;line-height: 26px;">{{item.comment}}
			</view>
			<view class="time">{{item.createtime_text}}</view>
			<view style="margin-left: 24rpx;margin-right: 24rpx;border: 1px solid #FFFFFF;"></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				commentLists:null,
				store_shop_id:null,
				goods_id:null
			};
		},
		onLoad(options) {
			console.log(options)
			console.log(this.$Route.query)
			this.store_shop_id = options.store_shop_id
			this.goods_id = options.goods_id
			this.getCommentLists()
		},
		methods:{
			async getCommentLists() {
				console.log("=========commentLists")
				var that = this;
				that.$https('category.commentLists', {
						token: uni.getStorageSync("token"),
						store_shop_id: this.store_shop_id
					})
					.then(res => {
						console.log("*****************--", res);
						if (res.code === 1) {
							that.commentLists = res.data.data;
			
					 }
					});
			}
		}
	}
</script>

<style lang="scss" scoped>
.time {
		font-size: 12px;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #777777;
		line-height: 22px;
		margin-top: 20rpx;
	}
</style>
